package car.aistar.service.Impl.xrb;

import car.aistar.entity.Seller;
import car.aistar.service.SellerService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;


/**
 * @ClassName testSeller
 * @Description TODO
 * @Author laoxu
 * @Date 2020/10/1 19:43
 * Version 1.0
 **/

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring/spring-*.xml")
public class testSeller {

    @Autowired
    private SellerService sellerService;


    @Test
    public void testSellerById(){
        System.out.println(sellerService.queryById(2L));
    }

    @Test
    public void testSellerByLimit(){
        System.out.println(sellerService.queryAllByLimit(4,2));
    }

    @Test
    public void testSellerInsert(){
        Seller seller = new Seller(null,"lilei","11111111111","11sss","sss213",new Date(),11L);
        sellerService.insert(seller);
    }

    @Test
    public void testSellerUpdate(){
        Seller seller = new Seller(null,"lilei","11111111111","11sss","sss213",new Date(),11L);
        sellerService.update(seller);
    }

    @Test
    public void testSellerDeleteId(){
        sellerService.deleteById(31L);
    }

//    @Test
//    public void testQuery(){
//        System.out.println(sellerService.queryAll());
//    }
}
